Field of the Invention
The present invention relates to an image processing apparatus and a control method therefor, and in particular to technology for aligning (or correcting misalignment of) a plurality of pieces of image data.
Description of the Related Art
In recent years, a method for generating a single image by synthesizing images obtained by capturing a scene multiple times has been suggested. The purpose of this method is to, for example, increase the dynamic range of a solid-state image sensor, reduce noise, and suppress camera shakes in a television camera, an electronic still camera, and the like.
When a scene is captured multiple times while holding a camera by hand, the obtained plurality of images exhibit misalignment attributed to the influence of camera shakes. Therefore, the obtained plurality of images are synthesized after correcting the misalignment (being aligned). The misalignment can be detected as, for example, a motion vector between images.
When aligning an image captured with flash light with an image captured without flash light using a motion vector detected between the images, there is a possibility that the motion vector cannot be detected appropriately. Note that the former image denotes an image that light was emitted by a flash within a period in which the image being captured (i.e., an image sensor being exposed), and the latter image denotes an image that no light was emitted by the flash within a period in which the image being captured. When using a misalignment detection method whereby light emitted by the flash influences the result of detection, it is preferable not to use information of regions illuminated by flash light.
Japanese Patent Laid-Open No. 2010-26284 discloses technology for, when performing the alignment by detecting a motion vector of characteristic points, improving the accuracy of detection of the motion vector using an image captured with flash light.